package com.lagou.service.impI;

import com.lagou.dao.T_articleDao;
import com.lagou.domain.T_article;
import com.lagou.service.T_articleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author wsl
 * @Date 2021/11/15 19:43
 * @Project_Name jdbc_spring
 */
@Service
@Transactional
public class T_articleServiceImpI implements T_articleService {

    @Autowired
    private T_articleDao t_articleDao;

    /**
     * 添加文章信息  切入点
     *
     * @param t_article
     */
    public void save(T_article t_article) {
        t_articleDao.save(t_article);
        //测试错误
        int i = 1/0;
        System.out.println("添加成功！！！");
    }
}
